package com.liugege.make.builder;
/**
* @author: LiuGeGe
* @Date: 2022/3/3 15:59
* @Description(类描述):  指挥者
* @Class(类): Director
*/
public class Director {
    HouseBuilder houseBuilder = null;

    public Director() {
    }

    public Director(HouseBuilder houseBuilder) {
        this.houseBuilder = houseBuilder;
    }

    public void setHouseBuilder(HouseBuilder houseBuilder) {
        this.houseBuilder = houseBuilder;
    }

    //操作
    public  House constructHouse(){
        houseBuilder.buildBase();
        houseBuilder.buildWall();
        houseBuilder.buildRoot();
        return houseBuilder.build();
    }
}
